import request from '@/utils/request'

// 创建告警异常列表
export function createCameraEvent(data) {
  return request({
    url: '/system/camera-event/create',
    method: 'post',
    data: data
  })
}

// 更新告警异常列表
export function updateCameraEvent(data) {
  return request({
    url: '/system/camera-event/update',
    method: 'put',
    data: data
  })
}

// 删除告警异常列表
export function deleteCameraEvent(id) {
  return request({
    url: '/system/camera-event/delete?id=' + id,
    method: 'delete'
  })
}

// 获得告警异常列表
export function getCameraEvent(id) {
  return request({
    url: '/system/camera-event/get?id=' + id,
    method: 'get'
  })
}

// 获得告警异常列表分页
export function getCameraEventPage(query) {
  return request({
    url: '/system/camera-event/page',
    method: 'get',
    params: query
  })
}

// 导出告警异常列表 Excel
export function exportCameraEventExcel(query) {
  return request({
    url: '/system/camera-event/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
